Voigt Form

Tensorial.frommandelMethod
frommandel(S::Type{<: Union{SymmetricSecondOrderTensor, SymmetricFourthOrderTensor}}, A::AbstractArray{T})

Create a tensor of type S from Mandel form. This is equivalent to fromvoigt(S, A, offdiagscale = √2).

See also fromvoigt.

source
Tensorial.fromvoigtFunction
fromvoigt(S::Type{<: Union{SecondOrderTensor, FourthOrderTensor}}, A::AbstractArray{T})
fromvoigt(S::Type{<: Union{SymmetricSecondOrderTensor, SymmetricFourthOrderTensor}}, A::AbstractArray{T}; [offdiagscale])

Converts an array A stored in Voigt format to a Tensor of type S.

Keyword arguments:

  • offdiagscale: determines the scaling factor for the offdiagonal elements.
  • order: vector of cartesian indices (Tuple{Int, Int}) determining the Voigt order. The default order is [(1,1), (2,2), (3,3), (2,3), (1,3), (1,2), (3,2), (3,1), (2,1)]

See also tovoigt.

julia> fromvoigt(Mat{3,3}, 1.0:1.0:9.0)
3×3 Tensor{Tuple{3,3},Float64,2,9}:
 1.0  6.0  5.0
 9.0  2.0  4.0
 8.0  7.0  3.0

julia> fromvoigt(SymmetricSecondOrderTensor{3},
                 1.0:1.0:6.0,
                 offdiagscale = 2.0,
                 order = [(1,1), (2,2), (3,3), (1,2), (1,3), (2,3)])
3×3 Tensor{Tuple{Symmetry{Tuple{3,3}}},Float64,2,6}:
 1.0  2.0  2.5
 2.0  2.0  3.0
 2.5  3.0  3.0
source
Tensorial.tomandelMethod
tomandel(A::Union{SymmetricSecondOrderTensor, SymmetricFourthOrderTensor})

Convert a tensor to Mandel form which is equivalent to tovoigt(A, offdiagscale = √2).

See also tovoigt.

source
Tensorial.tovoigtFunction
tovoigt(A::Union{SecondOrderTensor, FourthOrderTensor}; [order])
tovoigt(A::Union{SymmetricSecondOrderTensor, SymmetricFourthOrderTensor}; [order, offdiagonal])

Convert a tensor to Voigt form.

Keyword arguments:

  • offdiagscale: determines the scaling factor for the offdiagonal elements.
  • order: vector of cartesian indices (Tuple{Int, Int}) determining the Voigt order. The default order is [(1,1), (2,2), (3,3), (2,3), (1,3), (1,2), (3,2), (3,1), (2,1)]

See also fromvoigt.

julia> x = Mat{3,3}(1:9...)
3×3 Tensor{Tuple{3,3},Int64,2,9}:
 1  4  7
 2  5  8
 3  6  9

julia> tovoigt(x)
9-element StaticArrays.SArray{Tuple{9},Int64,1,9} with indices SOneTo(9):
 1
 5
 9
 8
 7
 4
 6
 3
 2

julia> x = SymmetricSecondOrderTensor{3}(1:6...)
3×3 Tensor{Tuple{Symmetry{Tuple{3,3}}},Int64,2,6}:
 1  2  3
 2  4  5
 3  5  6

julia> tovoigt(x; offdiagscale = 2,
                  order = [(1,1), (2,2), (3,3), (1,2), (1,3), (2,3)])
6-element StaticArrays.SArray{Tuple{6},Int64,1,6} with indices SOneTo(6):
  1
  4
  6
  4
  6
 10
source